<%@page pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"; %>
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.messager.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
<jsp:include page="../admin_head.jsp">
	<jsp:param value="用户信息" name="title" />
</jsp:include>
</head>
<body>
	<div class="container-fluid" >
		<div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<div class="panel panel-success" align="center">
				<div class="panel-heading">
				<h1 >课堂教学质量评价系统</h1><br/>当前用户:${user.nickName }&nbsp;&nbsp;&nbsp;
						当前用户角色：${user.userRole }
				&nbsp;&nbsp;&nbsp;&nbsp;<a href="userlist.action?userId=${user.id }"><button class="btn btn-sm btn-success">首页</button></a>
						<a href="${pageContext.request.contextPath }/user/user.action"> <button class="btn btn-sm btn-danger" > <B> 退出登录 </B> </button> </a></div>
				</div>
				<jsp:include page="../user/admin_nav.jsp">
					<jsp:param value="用户界面" name="title" />
				</jsp:include>
				<div class="panel panel-success">
				<div class="panel panel-primary" style="margin-top:15px;margin-left: 300px;width:900px">
					<div class="panel-heading"> <h3 class="panel-title">用户信息</h3> </div>
					<div class="panel-body" >
						<form method="post" action="addClassAndUser.action">
							<input type="hidden" name="operatorId" value="${user.id }">
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" style="width: 200px;" id="class_div">
									<span class="input-group-addon">课程</span> 
									<select class="form-control" name="classId" id="classSelect">
										<c:if test="${classList ne null}">
											<c:forEach items="${classList}" var="cl" varStatus="vs">
												<option value="${cl.id}" >${cl.name}</option>
											</c:forEach>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
							<div class="input-group" style="width: 200px;" id="class_div">
									<span class="input-group-addon">对应用户</span> 
									<select class="form-control" name="userId" id="classSelect">
										<c:if test="${userList ne null}">
											<c:forEach items="${userList}" var="vo" varStatus="vs">
												<option value="${vo.id}" >${vo.nickName}</option>
											</c:forEach>
										</c:if>
									</select>
							</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
							<div class="input-group" style="width: 200px;" id="class_div">
									<span class="input-group-addon">用户与课程关系</span> 
									<select class="form-control" name="class_status" >
										<option value="1" selected="selected">在修</option>
										<option value="3" >在教</option>
									</select>
							</div>
							</div>
							<button class="btn btn-primary" style="width: 400px; margin-top: 30px; margin-left: 230px" type="submit">提交</button>
						</form>
						<button class="btn btn-success" onClick="location.href='userlist.action?userId=${user.id}'" style="width: 400px; margin-top: 20px; margin-left: 230px">返回</button>
					</div>
				</div>
				</div>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
</body>
</html>